package cn.edu.gsau.info.controller;

import cn.edu.gsau.info.models.Node;
import cn.edu.gsau.info.models.ResponseResult;
import cn.edu.gsau.info.service.INodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/node")
public class NodeController {
    @Autowired
    INodeService iNodeService;


    @GetMapping("/findnode")
    public ResponseResult findNode(){
        List<Node> list = iNodeService.list();
        return new ResponseResult<Object>(200,"成功",list);
    }

}
